package com.atguigu.structures;

//自定义链表
public class LinkedListExample {

    public static void main(String[] args) {
        Node node = new Node(1);
        node.next=new Node(2);
        node.next.next=new Node(3);
        while (node!=null){
            System.out.println(node.value);
            node=node.next;
        }
    }

    public static class Node {
        public int value;
        public Node next;

        public Node(int value) {
            this.value = value;
            this.next=null;
        }
    }
}
